package com.operation.utils;

import com.operation.beans.Result;

/**
 * Created by LCJ on 2017/4/6.
 */
public class ResultUtil {

    public static Result success(Object object,Integer code) {
        Result result = new Result();
        result.setCode(code);
        result.setMsg("成功");
        result.setData(object);
        return result;
        }

        public static Result success() {
        return success(null,null);
        }
        public static Result error(Integer code, String msg) {
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        return result;
    }

}
